package mrsimulator;

import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: codefish
 * Date: 11/7/12
 * Time: 10:35 PM
 * To change this template use File | Settings | File Templates.
 */
public class TaskTrackerStatus {


    private String ttid;
    private int mapSlot = 0;
    private int reduceSlot = 0;
    private TaskTrackerSimulator tt;

    private List<Task> finishedMapTasks;
    private List<Task> finishedReduceTasks;
    private List<Task> runningReduceTasks;

    public TaskTrackerStatus(int mapSlot, int reduceSlot, String ttid, TaskTrackerSimulator ttsimu) {
        this.mapSlot = mapSlot;
        this.reduceSlot = reduceSlot;
        this.ttid = ttid;
        this.tt = ttsimu;

        // init reports
        finishedMapTasks = new LinkedList<Task>();
        finishedReduceTasks = new LinkedList<Task>();
        runningReduceTasks = new LinkedList<Task>();
    }

    public String getTtid() {
        return ttid;
    }

    public String getHost() {
    	return tt.getVNodeId();
    }
    
    public int getMapSlot() {
        return mapSlot;
    }

    public void setMapSlot(int mapSlot) {
        this.mapSlot = mapSlot;
    }
    public int getReduceSlot() {
        return reduceSlot;
    }

    public void setReduceSlot(int reduceSlot) {
        this.reduceSlot = reduceSlot;
    }

    public List<Task> getMapFinishReport() {
        return this.finishedMapTasks;
    }

    public void setMapFinishReport(List<Task> mapFinishReport) {
        this.finishedMapTasks = mapFinishReport;
    }

    public List<Task> getReduceFinishReport() {
        return this.finishedReduceTasks;
    }

    public void setReduceFinishReport(List<Task> reduceFinishReport) {
        this.finishedReduceTasks = reduceFinishReport;
    }

    public List<Task> getRunningReduceTasks() {
        return runningReduceTasks;
    }

    public void setRunningReduceTasks(List<Task> runningReduceTasks) {
        this.runningReduceTasks = runningReduceTasks;
    }

}
